#include "StdAfx.h"
#include "ddragon.h"
#include "machine/doubledragonmachine.h"


InputPort ddragonPort1 =
	{
		{
		{"Right",	I_RIGHT,		0x01,	I_LOW},
		{"Left",		I_LEFT,		0x02,	I_LOW},
		{"Up",		I_UP,			0x04,	I_LOW},
		{"Down",		I_DOWN,		0x08,	I_LOW},
		{"Button 1",I_B1,			0x10,	I_LOW},
		{"Button 2",I_B2,			0x20,	I_LOW},
		{"Start 1",	I_START1,	0x40,	I_LOW},
		{"Start 2",	I_START2,	0x80,	I_LOW},
		}
	};

InputPort ddragonPort2 =
	{
		{
		{"Right",	I2_RIGHT,	0x01,	I_LOW},
		{"Left",		I2_LEFT,		0x02,	I_LOW},
		{"Up",		I2_UP,		0x04,	I_LOW},
		{"Down",		I2_DOWN,		0x08,	I_LOW},
		{"Button 1",I2_B1,		0x10,	I_LOW},
		{"Button 2",I2_B2,		0x20,	I_LOW},
		{"Coin 1",	I_COIN1,		0x40,	I_LOW},
		{"Coin 2",	I_COIN2,		0x80,	I_LOW},
		}
	};

InputPort ddragonPort3 =
	{
		{
		{"Service",	I_SERVICE,	0x01,	I_LOW},
		{"Button 3",I_B3,			0x02,	I_LOW},
		{"Button 3",I2_B3,		0x04,	I_LOW},
		{"Internal",0,				0x08,	I_HIGH},
		{"Internal",0,				0x10,	I_HIGH},
		{"Unknown",	0,				0x20,	I_LOW},
		{"Unknown",	0,				0x40,	I_LOW},
		{"Unknown",	0,				0x80,	I_LOW},
		}
	};

static highscore_t highscore[] =
	{
//	{0xB260,0x60,0x00,0x48},
	{0,-1}
	};

Cddragon::Cddragon()
{
SetName("ddragon");						//set romset name
SetScreen(256,256);
SetHighScoreInfo(highscore);
SetPort(0,&ddragonPort1);
SetPort(1,&ddragonPort2);
SetPort(2,&ddragonPort3);
AddROM("21j-1-5.26",	0x08000,0x08000,0x42045dfd,ROM_CPU1);
AddROM("21j-2-3.25",	0x10000,0x08000,0x5779705e,ROM_CPU1);
AddROM("21j-3.24",	0x18000,0x08000,0x3bdea613,ROM_CPU1);
AddROM("21j-4-1.23",	0x20000,0x08000,0x728f87b9,ROM_CPU1);
AddROM("63701.bin",	0x0C000,0x04000,0xf5232d03,ROM_CPU2);
AddROM("21j-0-1",		0x08000,0x08000,0x9efa95bb,ROM_CPU3);
AddROM("21j-5",		0x00000,0x08000,0x7a8b8db4,ROM_VROM1);
AddROM("21j-a",		0x00000,0x10000,0x574face3,ROM_VROM2);
AddROM("21j-b",		0x10000,0x10000,0x40507a76,ROM_VROM2);
AddROM("21j-c",		0x20000,0x10000,0xbb0bc76f,ROM_VROM2);
AddROM("21j-d",		0x30000,0x10000,0xcb4f231b,ROM_VROM2);
AddROM("21j-e",		0x40000,0x10000,0xa0a0c261,ROM_VROM2);
AddROM("21j-f",		0x50000,0x10000,0x6ba152f6,ROM_VROM2);
AddROM("21j-g",		0x60000,0x10000,0x3220a0b6,ROM_VROM2);
AddROM("21j-h",		0x70000,0x10000,0x65c7517d,ROM_VROM2);
AddROM("21j-8",		0x00000,0x10000,0x7c435887,ROM_VROM3);
AddROM("21j-9",		0x10000,0x10000,0xc6640aed,ROM_VROM3);
AddROM("21j-i",		0x20000,0x10000,0x5effb0a0,ROM_VROM3);
AddROM("21j-j",		0x30000,0x10000,0x5fb42e7c,ROM_VROM3);
AddROM("21j-6",		0x00000,0x10000,0x34755de3,ROM_SND1);
AddROM("21j-7",		0x10000,0x10000,0x904de6f8,ROM_SND1);
AddROM("21j-k-0",		0x00000,0x00100,0xfdb130a9,ROM_PROM);
AddROM("21j-l-0",		0x00100,0x00200,0x46339529,ROM_PROM);
}

CMachine *Cddragon::CreateMachine()
{
return(new CDoubleDragonMachine());
}
